﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ARR.Entities.Validation.ComponentModel;
using ARR.Entities.ComponentModel;
using ARR.Entities.Validation.Common;
using ARR.Shared;

namespace ARR.Entities.Validation
{
    [Serializable]
    public class UnitOfMeasureInputValidations : InputValidationBase
    {
        private UnitOfMeasureConvertion uom;

        public UnitOfMeasureInputValidations(UnitOfMeasureConvertion uom)
        {
            this.uom = uom;
        }

        public override List<ValidationBase> CreateValidations()
        {
            List<ValidationBase> inputValidations = new List<ValidationBase>();
                        
            inputValidations.Add(new Required("SourceUnit", Labels.UomOrigen));
            inputValidations.Add(new StringLength("SourceUnit", 50, Labels.UomOrigen));
            
            inputValidations.Add(new Required("TargetUnit", Labels.UomDestino));
            inputValidations.Add(new StringLength("TargetUnit", 50, Labels.UomDestino));

            return inputValidations;
        }
    }
}
